<?php

$action = ucwords($_GET['action'] . 'Controller');
include '../controllers/' . $action . '.php';
$controller = new $action();

if (!isset($_GET['result'])) {
    header("Location: " . $controller->$_GET['method']());
} else if ($_GET['result'] == "ajax") {
    echo $controller->$_GET['method']();
}
?>